﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace EjercicioI
{
    class NuevaAgenciaAlquiler
    {
        static void Main(string[] args)
        {

            Turismo pepe = new Turismo("asdfag",true,40);
            ArrayList Vehiculos = new ArrayList();

            Vehiculos.Add(pepe);
            Vehiculos.Add(new Camion("gfad",true,50));
            Vehiculos.Add(new Camion("zxcv", false,50));
            Vehiculos.Add(new Turismo("123456",true,40));
            Vehiculos.Add(new Turismo("qwerty", false,40));

            pepe.alquilar(1);

            foreach (Vehiculo item in Vehiculos)
            {

                item.showinfo();


            }

            foreach (Vehiculo item in Vehiculos)
            {

                if (item.estaAlquilado())
                {
                    item.devolver(50);
                }

            }

        }
    }
}
